
export default {

    height: "100%",
    keepSource: true,
    filterConfig: {
        remote: false
    },
    data: [],
    // pagerConfig: {
    //     total: 0,
    //     currentPage: 1,
    //     pageSize: 10,
    //     pageSizes: [10, 20, 30, 40, 50]
    // },
    proxyConfig: {
        sort: true,
        filter: true,
        autoLoad: false,
        form: true,
        props: {
            list: 'data.data.records',
            result: 'data.records',
            total: 'data.total'
        },
        ajax: {
            query: {
               url: '/regis/template/page'
            },
            delete: '/regis/template',
            save: '/regis/template'
        }
    },
    // editConfig: {
    //     trigger: 'click',
    //     mode: 'cell',
    //     showStatus: true
    // },
    toolbar: {
        buttons: [
            { code: 'insert_actived', name: '添加', icon: 'fa fa-plus' },
            { code: 'delete_selection', name: '删除', icon: 'fa fa-bookmark-o' },
            { code: 'save', name: '保存', icon: 'fa fa-save' }
        ],
        refresh: true,
    },
    formConfig: {
        titleWidth: 70,
        titleAlign: 'right',
        data: {
          wareId: '',
          classId: ''
        }
    },
    editRules: {
        classId: [
            { required: true, message: '班次必须填写' },
            // { pattern: '\\w{3,50}', message: '名称长度在 3 到 50 个字符' }
        ],
        week: [
            { required: true, message: '星期必须填写' }
        ]
    },
    columns: [
        { type: 'checkbox', width: 50 },
        { field: 'wareId', title: '科室', minWidth: 100, editRender: { name: 'input'},visible: false },
        { field: 'groupId', title: '模板名称', minWidth: 80,visible: false},
        { field: 'week', title: '星期', minWidth: 60, editRender: { name: 'select', options: [],defaultValue: '1'} },
        { field: 'classId', title: '班次', minWidth: 60,
            editRender: { name: 'select', options: '/regis/classkind/page',optionProps:{value:'id',label: 'className', disabled: false}},
            slots: {
                default: 'class_default'
            }
         },
        { field: 'personInfo', title: '值班人', minWidth: 100, slots:{default: 'person_edit',edit: 'person_edit'}},
        {  title: '操作', minWidth: 50, slots:{default: 'operation'},showOverflow:true},
        { field: 'id', title: 'ID', minWidth: 100, editRender: { name: 'input' },visible: false }
    ]
}
export const wareList=[]
